<template>
<h1>事件绑定指令</h1>
  <button v-on:click="f">点击弹窗</button>
  <h3>敲回车事件</h3>
  <input type="text" placeholder="请搜索你喜欢的影片"
         @keydown.enter="ent()" v-model="search">
</template>
<script setup>
import {ref} from "vue";

const f=()=>{
  alert("弹窗了！")
}
const ent=()=>{
  alert("你想搜索的内容是:"+search.value)
}
const search=ref("大话西游");
</script>


<style scoped>

</style>